home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-04-08 | 2.5 KB | 149 lines | [mlts/slnk] |
- !
- ! The ARA script for Direct Connection
- ! (i.e. for a direct serial link or for other links with PortConnector™ installed)
- ! The "phone number" parameter is used to set the desired port speed,
- ! the values supported are: 2400, 4800, 9600, 19200, 38400, 57600
- !
- ! version:1.0
- ! Copyright © 1993, Stalker GmbH
- !
- @Hangup
- DTRClear
- pause 10
- DTRSet
- Flush
- exit 0
- !
- ! Originating a call:
- ! • Set a magic sequence on 300 bps
- ! • Wait for the correct response
- ! • Say him the desired speed, switch to this speed
- ! • And wait for the correct response
- !
- @Originate
- SerReset 300,0,8,1
- SetTries 3
- @Label 10
- Flush
- MatchClr
- MatchStr 1 12 "@@DIRECT OK@@"
- Write "\13\10@@DIRECT?@@\13\10"
- MatchRead 100
- Flush
- DecTries
- IfTries 0 10
- Exit -6023
- !
- ! Now - say him the desired speed
- !
- @Label 12
- IfStr 1 21 "2400"
- IfStr 1 22 "4800"
- IfStr 1 23 "9600"
- IfStr 1 20 "19200"
- IfStr 1 24 "38400"
- IfStr 1 25 "57600"
- !
- ! All others - 19200
- Note "'^1' is not supported. Using 19200bps…" 2
- Pause 20
- @Label 20
- Write "@19200\13\10"
- Pause 5
- SetSpeed 19200
- Jump 30
- @Label 21
- Write "@2400\13\10"
- Pause 5
- SetSpeed 2400
- Jump 30
- @Label 22
- Write "@4800\13\10"
- Pause 5
- SetSpeed 4800
- Jump 30
- @Label 23
- Write "@9600\13\10"
- Pause 5
- SetSpeed 9600
- Jump 30
- @Label 24
- Write "@38400\13\10"
- Pause 5
- SetSpeed 38400
- Jump 30
- @Label 25
- Write "@57600\13\10"
- Pause 5
- SetSpeed 57600
- Jump 30
- !
- @Label 30
- MatchClr
- MatchStr 1 31 "@CONNECT\13\10"
- MatchRead 50
- Exit -6021
- @Label 31
- Note "Connected" 2
- Pause 15
- Exit 0
- !
- ! Waiting for and answering incoming connection requests
- !
- @Answer
- SerReset 300,0,8,1
- @Label 50
- Flush
- MatchClr
- MatchStr 1 51 "@@DIRECT?@@"
- MatchRead 700
- Jump 50
- @Label 51
- Note "Incoming Request…" 2
- UserHook 1
- MatchClr
- MatchStr 1 60 "@2400\13"
- MatchStr 2 61 "@4800\13"
- MatchStr 3 62 "@9600\13"
- MatchStr 4 63 "@19200\13"
- MatchStr 5 64 "@38400\13"
- MatchStr 6 65 "@57600\13"
- Write "\13\10@@DIRECT OK@@\13\10"
- MatchRead 50
- Exit -6021
- !
- ! Process the speed change request
- @Label 60
- Note "Communicating at 2400bps" 2
- SetSpeed 2400
- Jump 70
- @Label 61
- Note "Communicating at 4800bps" 2
- SetSpeed 4800
- Jump 70
- @Label 62
- Note "Communicating at 9600bps" 2
- SetSpeed 9600
- Jump 70
- @Label 63
- Note "Communicating at 19200bps" 2
- SetSpeed 19200
- Jump 70
- @Label 64
- Note "Communicating at 38400bps" 2
- SetSpeed 38400
- Jump 70
- @Label 65
- Note "Communicating at 57600bps" 2
- SetSpeed 57600
- Jump 70
- !
- ! Set the Final response
- !
- @Label 70
- Pause 10
- Flush
- Write "\13\10@CONNECT\13\10"
- Pause 5
- Exit 0
- !